<?php
$menu = 'mywork';
include_once 'head.php';
include_once 'dbconfig.php';
if (filter_input(INPUT_GET, 'id')) {
    // 查询数据
    $data = array(
        "id" => $_GET['id']
    );
    $statement = "select year,teacherId,name,typeName,rankName,content,classHour,amountClass,money,amountMoney,work.status,work.evidence from work,user where user.userName=work.teacherId and work.id = :id";
    $statementObject = $pdo->prepare($statement);
    $statementObject->execute($data);
    $result = $statementObject->fetch();
    if (! $result) {
        header("location:jump.php?error=无有效数据&url=worktype.php&wait=2");
    }
}
?>
<div id="page-wrapper">
	<div id="page-inner">
		<div class="row">
			<div class="col-md-12">
				<h2 align='center'>查看非授课工作信息</h2>
			</div>
		</div>
		<!-- /. ROW  -->
		<hr />
		<div class="row">
			<div class="col-md-8 col-md-offset-2 col-sm-12 col-sm-offset-0 col-xs-10 col-xs-offset-2">
				<div class="panel panel-default">
					<div class="panel-heading">
						<strong>查看非授课工作信息</strong>
					</div>
					<div class="panel-body">
						<br />
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-flag">&nbsp;年度</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['year']?>" />
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-flag">&nbsp;教工号</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['teacherId']?>" /> <span
								class="input-group-addon"><i class="fa fa-level-up"> &nbsp;姓名</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['name']?>" />
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-flag">&nbsp;类别</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['typeName']?>" /> <span
								class="input-group-addon"><i class="fa fa-level-up"> &nbsp;级别</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['rankName']?>" />
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-navicon">&nbsp;内容</i></span>
							<textarea class="form-control" rows="5" disabled="disabled"><?=$result['content']?></textarea>
						</div>
						<input type="hidden" name='amount' value="1" />
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-clock-o">&nbsp;
									折算课时</i></span> <input type="text" class="form-control"
								disabled="disabled" value="<?=$result['classHour']*$result['amountClass']?>" /> <span
								class="input-group-addon"><i class="fa fa-yen"> &nbsp;奖励分值</i></span>
							<input type="text" class="form-control" disabled="disabled"
								value="<?=$result['money']*$result['amountMoney']?>" />
						</div>
						<div class="form-group input-group">
							<span class="input-group-addon"><i class="fa fa-clock-o">&nbsp;
									状态</i></span> <input type="text" class="form-control"
								disabled="disabled" value="<?=$result['status']?>" />
						</div>
						<a class="btn btn-primary" href="mywork.php"> 关&nbsp;&nbsp;闭  </a>&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="<?=$result['evidence']==""?"javascript:alert('用户未上传证明文件！');":$result['evidence']?>" target="_blank" class="btn btn-primary">查看证明材料</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="foot-wrapper" align='center'>
			版权所有@2017-<?=date("Y")?>，计算机与设计学院<br /> 非授课工作量管理系统，网址：<a
		href='www.betgod.top/workload'>www.betgod.top/workload</a> <br /> <br />
</div>
<!-- /. PAGE WRAPPER  -->
<!-- /. WRAPPER  -->
<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
<!-- JQUERY SCRIPTS -->
<script src="./assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="./assets/js/bootstrap.min.js"></script>
<!-- METISMENU SCRIPTS -->
<script src="./assets/js/jquery.metisMenu.js"></script>
</body>
</html>